The MQTT::Client#connect automatically calls #disconnect when a block is given.

Akinori MUSHA 10 years ago
parent
commit
fd991f7eb5
1 changed files with 0 additions and 4 deletions
  1. 0 4
      app/models/agents/mqtt_agent.rb

+ 0 - 4
app/models/agents/mqtt_agent.rb

@@ -110,8 +110,6 @@ module Agents
110 110
         incoming_events.each do |event|
111 111
           c.publish(interpolated(event)['topic'], event)
112 112
         end
113
-
114
-        c.disconnect
115 113
       end
116 114
     end
117 115
 
@@ -134,8 +132,6 @@ module Agents
134 132
           }
135 133
         rescue Timeout::Error
136 134
         end
137
-
138
-        c.disconnect   
139 135
       end
140 136
     end
141 137